package com.neuedu.corejava.ch10test;

import java.util.HashMap;
import java.util.Random;

public class TestBankDeositor {

	public static void main(String[] args) {
		HashMap<String, BankDepositor> userMap = new HashMap<String, BankDepositor>();

		for (int i = 0; i < 10; i++) {
			userMap.put("user" + i, new BankDepositor("user" + i, "user name" + i, new Random().nextInt(50000)));
		}
		String userId = "user6";
		BankDepositor user = userMap.get(userId);
		System.out.println(user.getBalance());
	}
}
//for(int i=0;i<10;i++) {
//	BankDepositor user=userMap.get("user"+i);
//	System.out.print(user.getBalance()+"\t");
//}